﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="InHoaDonBanHang.ascx.cs" Inherits="WebUserControl_InHoaDonBanHang" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>

<style type="text/css">
    body
    {
	    margin: 0px 0px 0px 0px;
	    padding: 0px 0px 0px 0px;
	    font-family: verdana, arial, helvetica, sans-serif;
	    font-size: 11px;
	    letter-spacing: 0.4pt;
	    color: #666666;
    }

    a
    {
	    color: #993300;
	    text-decoration: none;
    }
    a:active
    {
	    border-bottom: 2px dotted Red;
    }
    a:hover
    {
	    color: #993300;
	    text-decoration: none;
    }


    .wrap
    {
	    width: 100%;
	    height: 100%;
    }



    input
    {
	    font-family: verdana, arial, helvetica, sans-serif;
	    font-size: 10px;
    }

    select
    {
	    font-family: arial, verdana, helvetica,sans-serif;
	    font-size: 11px;
    }
    textarea
    {
	    font-family: verdana, arial, helvetica, sans-serif;
	    text-decoration: none;
	    font-size: 10px;
    }

    /* Modal Popup CSS*/
    .mpBg
    {
	    background-color: #3753fc;
	    filter: alpha(opacity=30);
	    opacity: 0.3;
    }
    .mp
    {
	    background-color: white;
	    border-width: 3px;
	    border-style: solid;
	    border-color: Gray;
	    padding: 3px;
    }
    .mpHd
    {
	    background-color: #616cae;border-color: White;
	    border-width: 1px;
	    color: White;
	    font-weight: bold;
	    width: 100%;
	    height: 16px;
    }
    
    
</style>

<asp:UpdatePanel ID="udpMsj" runat="server" UpdateMode="Conditional" RenderMode="Inline">
    <ContentTemplate>    
        <asp:Button ID="btnD" runat="server" Text="" Style="display: none" Width="0" Height="0" />
        <asp:Button ID="btnD2" runat="server" Text="" Style="display: none" Width="0" Height="0" />
        <asp:Panel ID="pnlMsg" runat="server" CssClass="mp" Style="display: none" Width="550px">
            <asp:Panel ID="pnlMsgHD" runat="server" CssClass="mpHd">
                &nbsp;In Hóa Đơn Bán Hàng
            </asp:Panel>       
            
            <div>
                <table width="100%">
                    <tbody>
                        <tr>
                            <td>
                                <asp:Panel ID="pnlPrintHoaDon" runat="server">
                                    
                                    <table width="100%">
                                        <tbody>
                                            <tr>
                                                <td colspan="4">
                                                </td>
                                            </tr>  
                                            <tr>                                        
                                                <td colspan="4" align="left">
                                                    <asp:Label ID="lblTrungTamPP" runat="server" Text=""></asp:Label>
                                                </td>
                                                
                                            </tr>
                                            <tr>                                        
                                                <td colspan="4" align="left">
                                                
                                                    <asp:Label ID="lblDiaChi" runat="server" Text=""></asp:Label>
                                                
                                                </td>
                                                
                                            </tr>
                                            <tr>                                        
                                                <td colspan="4" align="left">
                                                
                                                    <asp:Label ID="lblTelFax" runat="server" Text=""></asp:Label>
                                                
                                                </td>
                                                
                                            </tr>
                                            <tr>
                                                <td colspan="4"></td>
                                            </tr>                                   
                                            <tr>
                                                <td colspan="4" align="center" class="lblTitleReport">
                                                    Lệnh Xuất Hàng
                                                </td>
                                            </tr>
                                            <tr>
                                                <td colspan="2">
                                                    <table width="100%">                                                
                                                        <tr>
                                                            <td>
                                                                Tư vấn viên:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                                                <asp:Label ID="lblTenTVV" runat="server" Text=""></asp:Label>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>
                                                                Điện thoại:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                                                <asp:Label ID="lblDienThoai" runat="server" Text=""></asp:Label>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>
                                                                Số đơn hàng:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                                                <asp:Label ID="lblSoDonHang" runat="server" Text=""></asp:Label>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>
                                                                Ngày đơn hàng:&nbsp;
                                                                <asp:Label ID="lblNgayDonHang" runat="server" Text=""></asp:Label>
                                                                &nbsp;</td>
                                                        </tr>
                                                    </table>
                                                </td>
                                                <td colspan="2">
                                                    <asp:Panel ID="PanelHD" runat="server" Width="100%" BorderColor="Black" 
                                                        BorderStyle="Double">
                                                        <table width="100%">
                                                            <tr>
                                                                <td align="center" class="lblTitleReport" >
                                                                    Phần Phiếu Thu                                                            
                                                                </td>                                                        
                                                            </tr>
                                                            <tr>
                                                                <td>
                                                                    Số phiếu thu:&nbsp;
                                                                    <asp:Label ID="lblSoPhieuThu" runat="server" Text=""></asp:Label>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td>
                                                                    Tư vấn viên:&nbsp;&nbsp;
                                                                    <asp:Label ID="lblTenTVVPhieuThu" runat="server" Text=""></asp:Label>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td>
                                                                    Số tiền:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                                                    <asp:Label ID="lblSoTien" runat="server" Text="" Font-Bold="True" ForeColor="Red"></asp:Label>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td>
                                                                    Thủ quỹ ký tên ________________________</td> 
                                                            </tr>
                                                        </table>
                                                    </asp:Panel>
                                                </td>
                                            </tr>
                                            
                                            <tr>                                        
                                                <td colspan="4">
                                                    
                                                </td>                                        
                                            </tr>             
                                            
                                            <tr>
                                                <td colspan="4">
                                                    <asp:GridView ID="gvListChiTietHoaDon" runat="server" 
                                                        AutoGenerateColumns="False" Width="100%">
                                                        <Columns>
                                                            <asp:BoundField DataField="STT" HeaderText="STT">
                                                                <ItemStyle HorizontalAlign="Center" Width="40px" />
                                                            </asp:BoundField>
                                                            <asp:BoundField DataField="MaHang" HeaderText="Mã hàng" >
                                                                <HeaderStyle HorizontalAlign="Left" />
                                                            </asp:BoundField>
                                                            <asp:BoundField DataField="TenHang" HeaderText="Tên hàng" >
                                                                <HeaderStyle HorizontalAlign="Left" />
                                                            </asp:BoundField>
                                                            <asp:BoundField DataField="SoLuong" HeaderText="Số Lượng" >
                                                                <ItemStyle HorizontalAlign="Center" />
                                                            </asp:BoundField>
                                                            <asp:BoundField DataField="Gia" HeaderText="Đơn giá" DataFormatString="{0:###,###.###}">
                                                                <HeaderStyle HorizontalAlign="Left" />
                                                            </asp:BoundField>
                                                            <%--<asp:BoundField DataField="ChietKhau" HeaderText="% Chiết khấu" />--%>
                                                            <asp:BoundField DataField="ThanhTien" HeaderText="Thành tiền" 
                                                                DataFormatString="{0:###,###.###}">
                                                                <HeaderStyle HorizontalAlign="Left" />
                                                            </asp:BoundField>
                                                        </Columns>
                                                    </asp:GridView>
                                                </td>
                                            </tr>                                    
                                        </tbody>
                                    </table>
                                    <asp:Panel ID="pnlNVDieuChinhGia_F" runat="server">
                                    <table width="100%">
                                        <tr>
                                            <td colspan="3">
                                            </td>
                                            
                                        </tr>
                                        <tr>
                                            <td align="center">
                                                Tiền chưa chiết khấu
                                                <br />
                                                <asp:Label ID="lblTienChuaChietKhau" runat="server" Font-Bold="True" 
                                                    ForeColor="Red"></asp:Label>
                                            </td>                                    
                                            <td align="center">
                                                Khuyến mãi bằng tiền
                                                <br />
                                                <asp:Label ID="lblKhuyenMaiBangTien" runat="server" Font-Bold="True" 
                                                    ForeColor="Red"></asp:Label>
                                            </td>
                                            <td align="center">
                                                Tiền còn phải thanh toán
                                                <br />
                                                <asp:Label ID="lblTienConPhaiThanhToan" runat="server" Font-Bold="True" 
                                                    ForeColor="Red"></asp:Label>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td colspan="3">
                                            
                                            </td>                                    
                                        </tr>
                                        <tr>
                                            <td align="center">
                                                <asp:Label ID="lblChuKyKeToan" runat="server" Text="Kế toán"></asp:Label>                                        
                                            </td>
                                            <td align="center">
                                                <asp:Label ID="lblChuKyTVV" runat="server" Text="Tư vấn viên"></asp:Label>                                        
                                            </td>
                                            
                                            <td align="center">                                       
                                                
                                                 <asp:Label ID="lblChuKyThuKho" runat="server" Text="ThuKho"></asp:Label>                                        
                                            </td>                                        
                                        </tr>
                                        <tr>
                                            <td colspan="3" height="100px">
                                            
                                            </td>                                    
                                        </tr>
                                    </table>
                                    </asp:Panel>
                                </asp:Panel>
                            </td>
                        </tr>
                    </tbody>
                </table>
            </div>     
            <div style="text-align:center; width:100%;">
                <asp:Button ID="btnOK" runat="server" Text="OK" CausesValidation="false" Width="60px" />
                <asp:Button ID="btnPostOK" runat="server" Text="OK" CausesValidation="false" OnClick="btnPostOK_Click"
                    Visible="false" Width="60px" />
                <asp:Button ID="btnPostCancel" runat="server" Text="Cancel" CausesValidation="false"
                    OnClick="btnPostCancel_Click" Visible="false" Width="60px" />                           
            </div>
        </asp:Panel>
        <AjaxControls:ModalPopupExtender ID="mpeMsg" runat="server" TargetControlID="btnD"
            PopupControlID="pnlMsg" PopupDragHandleControlID="pnlMsgHD" BackgroundCssClass="mpBg"
            DropShadow="true" OkControlID="btnOK">
        </AjaxControls:ModalPopupExtender>        
    </ContentTemplate>
</asp:UpdatePanel>